package com.itany.cloud.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 黄衡熙
 * @version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_flight")
public class Flight {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String no;
    private String company;
    private String model;
    private Integer totalSeats;
    private String leaveCity;
    private String arrivalCity;
    private Double economyPrice;
    private Double firstPrice;
    private String leaveTime;
    private String arrivalTime;
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    public Flight(String no, String company, String model, Integer totalSeats, String leaveCity, String arrivalCity, Double economyPrice, Double firstPrice, String leaveTime, String arrivalTime) {
        this.no = no;
        this.company = company;
        this.model = model;
        this.totalSeats = totalSeats;
        this.leaveCity = leaveCity;
        this.arrivalCity = arrivalCity;
        this.economyPrice = economyPrice;
        this.firstPrice = firstPrice;
        this.leaveTime = leaveTime;
        this.arrivalTime = arrivalTime;
    }

    public Flight(String leaveCity, String arrivalCity, String no, String company, String leaveTime, String arrivalTime) {
        this.no = no;
        this.company = company;
        this.leaveCity = leaveCity;
        this.arrivalCity = arrivalCity;
        this.leaveTime = leaveTime;
        this.arrivalTime = arrivalTime;
    }
}